var i = 1
function get_movie() {
    $.ajax({
        url:"/movie",
        success: function(data){
            var r=data.re.length
            if (i>r-1){
                i=0
            }
            var myvideo = document.getElementById("video-details")
            myvideo.setAttribute("src", data.re[i])
            i++
        }
    })
}

